class CreateQuestions < ActiveRecord::Migration
  def self.up
    create_table :questions do |t|
      t.text        :content, :null => false
      t.integer     :position, :limit => 1, :default => 1
      t.integer     :day
      t.string      :answer_1
      t.string      :answer_2
      t.string      :answer_3
      t.integer     :correct_answer, :limit => 1, :default => 1
      
      t.timestamps
    end
    
    add_index :questions, :day
  end

  def self.down
    drop_table :questions
  end
end
